import request from '@/utils/request'

// 库位表格分页查询
export const getLocationPaging = (params: any) =>
  request({
    url: '/location/pageDetail',
    method: 'get',
    params
  })

// 改变库位状态--停用/启用
export const changeLocationStatus = (params: any) =>
  request({
    url: '/location',
    method: 'put',
    data: { ...params }
  })

// 删除库位
export const deleteLocation = (params: any) =>
  request({
    url: '/location',
    method: 'delete',
    params
  })

// 导入库位
export const uploadLocation = (params:any) =>
  request({
    url: '/location/upload',
    method: 'post',
    data: { ...params }
  })

// 查询全部库位  --不分页
export const getAllLocationList = (params: any) =>
  request({
    url: '/location/list',
    method: 'get',
    params
  })

// 查询全部库位详情  --不分页
export const getAllLocationDetailList = (params: any) =>
  request({
    url: '/location/listDetail',
    method: 'get',
    params
  })
